package Code.IfElseIfDemo;

import java.nio.file.attribute.GroupPrincipal;
import java.util.Scanner;

//会员制
public class Test2 {
    public static void main(String[] args) {
        //商品价格
        int price = 1000;
        //录入会员级别
        Scanner scanner =new Scanner(System.in);
        System.out.println("会员级别：");
        int vip = scanner.nextInt();

        if (vip ==1){
            System.out.println("支付的金额为："+(price * 0.9));
        }else if (vip ==2){
            System.out.println("支付的金额为："+(price * 0.8));
        }else if (vip == 3){
            System.out.println("支付的金额为："+(price * 0.7));
        }else {
            System.out.println("非会员，不打折");
        }
    }
}
